<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------

use think\migration\Seeder;

class WechatMenusSeed extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        \catcher\Utils::importTreeData($this->getPermissions(), 'permissions', 'parent_id');
    }

    protected function getPermissions()
    {
       return array (
  0 => 
  array (
    'id' => 71,
    'permission_name' => '微信管理',
    'parent_id' => 0,
    'level' => '',
    'route' => '/wechat',
    'icon' => 'wechat',
    'module' => 'wechat',
    'creator_id' => 1,
    'permission_mark' => 'wechat',
    'component' => 'layout',
    'redirect' => '/wechat/menus',
    'keepalive' => 1,
    'type' => 1,
    'hidden' => 1,
    'sort' => 1,
    'created_at' => 1591603025,
    'updated_at' => 1599371183,
    'deleted_at' => 0,
    'children' => 
    array (
      0 => 
      array (
        'id' => 72,
        'permission_name' => '微信菜单',
        'parent_id' => 71,
        'level' => '71',
        'route' => '/wechat/menus',
        'icon' => 'table',
        'module' => 'wechat',
        'creator_id' => 1,
        'permission_mark' => 'menus',
        'component' => 'wechatMenus',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 18,
        'created_at' => 1591603088,
        'updated_at' => 1599963701,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 73,
            'permission_name' => '列表',
            'parent_id' => 72,
            'level' => '71-72',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'menus@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304908,
            'updated_at' => 1599963701,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 74,
            'permission_name' => '保存',
            'parent_id' => 72,
            'level' => '71-72',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'menus@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304915,
            'updated_at' => 1599963701,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 75,
            'permission_name' => '更新',
            'parent_id' => 72,
            'level' => '71-72',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'menus@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304923,
            'updated_at' => 1599963701,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 76,
            'permission_name' => '删除',
            'parent_id' => 72,
            'level' => '71-72',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'menus@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304929,
            'updated_at' => 1599963701,
            'deleted_at' => 0,
          ),
          4 => 
          array (
            'id' => 77,
            'permission_name' => '同步',
            'parent_id' => 72,
            'level' => '71-72',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'menus@sync',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304938,
            'updated_at' => 1599963701,
            'deleted_at' => 0,
          ),
        ),
      ),
      1 => 
      array (
        'id' => 78,
        'permission_name' => '用户管理',
        'parent_id' => 71,
        'level' => '71',
        'route' => '/wechat/users',
        'icon' => 'el-icon-s-custom',
        'module' => 'wechat',
        'creator_id' => 1,
        'permission_mark' => 'users',
        'component' => 'routerView',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1592624761,
        'updated_at' => 1599371697,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 79,
            'permission_name' => '微信用户',
            'parent_id' => 78,
            'level' => '71-78',
            'route' => '/wechat/users/user',
            'icon' => 'user',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'users',
            'component' => 'wechatUsers',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 1,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1592624799,
            'updated_at' => 1599376002,
            'deleted_at' => 0,
            'children' => 
            array (
              0 => 
              array (
                'id' => 80,
                'permission_name' => '列表',
                'parent_id' => 79,
                'level' => '71-78-79',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'users@index',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304869,
                'updated_at' => 1599376002,
                'deleted_at' => 0,
              ),
              1 => 
              array (
                'id' => 81,
                'permission_name' => '标记',
                'parent_id' => 79,
                'level' => '71-78-79',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'users@remark',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304876,
                'updated_at' => 1599376002,
                'deleted_at' => 0,
              ),
              2 => 
              array (
                'id' => 82,
                'permission_name' => '拉黑',
                'parent_id' => 79,
                'level' => '71-78-79',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'users@block',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304884,
                'updated_at' => 1599376002,
                'deleted_at' => 0,
              ),
              3 => 
              array (
                'id' => 83,
                'permission_name' => '打标签',
                'parent_id' => 79,
                'level' => '71-78-79',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'users@tag',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304892,
                'updated_at' => 1599376002,
                'deleted_at' => 0,
              ),
              4 => 
              array (
                'id' => 84,
                'permission_name' => '同步',
                'parent_id' => 79,
                'level' => '71-78-79',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'users@sync',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304900,
                'updated_at' => 1599376002,
                'deleted_at' => 0,
              ),
            ),
          ),
          1 => 
          array (
            'id' => 85,
            'permission_name' => '微信标签',
            'parent_id' => 78,
            'level' => '71-78',
            'route' => '/wechat/users/tag',
            'icon' => 'el-icon-paperclip',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'tags',
            'component' => 'wechatTags',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 1,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1592722634,
            'updated_at' => 1599376011,
            'deleted_at' => 0,
            'children' => 
            array (
              0 => 
              array (
                'id' => 86,
                'permission_name' => '列表',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@index',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304575,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
              1 => 
              array (
                'id' => 87,
                'permission_name' => '新增',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@save',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304592,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
              2 => 
              array (
                'id' => 88,
                'permission_name' => '获取',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@read',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304830,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
              3 => 
              array (
                'id' => 89,
                'permission_name' => '更新',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@update',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304837,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
              4 => 
              array (
                'id' => 90,
                'permission_name' => '删除',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@delete',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304846,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
              5 => 
              array (
                'id' => 91,
                'permission_name' => '同步',
                'parent_id' => 85,
                'level' => '71-78-85',
                'route' => '',
                'icon' => '',
                'module' => 'wechat',
                'creator_id' => 1,
                'permission_mark' => 'tags@sync',
                'component' => '',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 2,
                'hidden' => 1,
                'sort' => 1,
                'created_at' => 1593304859,
                'updated_at' => 1599376011,
                'deleted_at' => 0,
              ),
            ),
          ),
        ),
      ),
      2 => 
      array (
        'id' => 92,
        'permission_name' => '图文管理',
        'parent_id' => 71,
        'level' => '71',
        'route' => '/wechat/graphic',
        'icon' => 'el-icon-document-add',
        'module' => 'wechat',
        'creator_id' => 1,
        'permission_mark' => 'graphic',
        'component' => 'wechatGraphic',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1593227704,
        'updated_at' => 1599371183,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 93,
            'permission_name' => '新增',
            'parent_id' => 92,
            'level' => '71-92',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'graphic@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304490,
            'updated_at' => 1595978929,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 94,
            'permission_name' => '获取',
            'parent_id' => 92,
            'level' => '71-92',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'graphic@read',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304510,
            'updated_at' => 1595978929,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 95,
            'permission_name' => '列表',
            'parent_id' => 92,
            'level' => '71-92',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'graphic@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 2,
            'created_at' => 1593304520,
            'updated_at' => 1595978929,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 96,
            'permission_name' => '更新',
            'parent_id' => 92,
            'level' => '71-92',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'graphic@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304530,
            'updated_at' => 1595978929,
            'deleted_at' => 0,
          ),
          4 => 
          array (
            'id' => 97,
            'permission_name' => '删除',
            'parent_id' => 92,
            'level' => '71-92',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'graphic@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1593304537,
            'updated_at' => 1595978929,
            'deleted_at' => 0,
          ),
        ),
      ),
      3 => 
      array (
        'id' => 98,
        'permission_name' => '微信回复',
        'parent_id' => 71,
        'level' => '71',
        'route' => '/wechat/reply',
        'icon' => 'el-icon-chat-line-round',
        'module' => 'wechat',
        'creator_id' => 1,
        'permission_mark' => 'reply',
        'component' => 'wechatReply',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1593323887,
        'updated_at' => 1599371183,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 99,
            'permission_name' => '列表',
            'parent_id' => 98,
            'level' => '71-98',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'reply@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1599292333,
            'updated_at' => 1599292373,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 100,
            'permission_name' => '新增',
            'parent_id' => 98,
            'level' => '71-98',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'reply@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1599292344,
            'updated_at' => 1599292344,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 101,
            'permission_name' => '删除',
            'parent_id' => 98,
            'level' => '71-98',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'reply@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1599292351,
            'updated_at' => 1599292351,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 102,
            'permission_name' => '禁用/启用',
            'parent_id' => 98,
            'level' => '71-98',
            'route' => '',
            'icon' => '',
            'module' => 'wechat',
            'creator_id' => 1,
            'permission_mark' => 'reply@disOrEnable',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1599292363,
            'updated_at' => 1599292363,
            'deleted_at' => 0,
          ),
        ),
      ),
    ),
  ),
);
    }
}
